import { Button, Input, NavBar } from 'antd-mobile';
import React, { useState } from 'react'
import { useSelector } from 'react-redux'
import { useNavigate } from 'react-router-dom';

function Index() {
  const {name}=useSelector((state)=>state.home)
  const naviagte=useNavigate()
  const {start,end,names}=useSelector((state)=>state.cont)
    console.log(start,end,names);
  
   const cha=()=>{
    naviagte('/list')
   }
  return (
    <div>
      <NavBar backIcon={false} back={<span onClick={()=>naviagte('/my')}>{name}</span>}>首页</NavBar>

      <div>
        <div style={{display:"flex"}}>
          <Input value={start}></Input>
          <Input value={end}></Input>
        </div>
        <Input value={names}></Input>
        <Button onClick={()=>cha()}>查询</Button>
      </div>
    </div>
  )
}

export default Index
